1. Field of the Invention
The present invention generally relates to computer software and hardware. More specifically, the present invention relates to a method and system for rendering a display of vector based drawing elements using a pencil stroke effect.
2. Description of the Related Art
Computer graphics are frequently generated using vector-based drawing representations of drawing elements. A vector-based drawing element includes a mathematical description that specifies the position, length, and direction in which lines are drawn to represent that element. Common vector-based drawing elements include lines, splines, curves, arcs, NURBS, etc. Using a vector-based representation of the drawing elements differs from bit-maps or rasterized images where a display image is represented as an array of picture elements (pixels) where a specific color value and intensity is specified for each pixel in the display. Representing a display image by lines and curves, i.e., as a vector-based drawing, rather than by bitmaps allows drawings to require less storage space. Additionally, vector based drawings are readily scalable to any desired size, where rasterized images will lose detail when shrunk and when increased in size.
Further, applying graphic effects to a rasterized image can be a repetitive and tedious process. Generally, a user must erase and redraw the pixels covered by the line to product a desired effect, e.g., a change in color. Blending such changes with surrounding regions in a drawing can turn into a pixel by pixel evaluation. In contrast, to change the color of a vector based line, a color property for the line may be changed. Thereafter, when that line is rendered the updated color is used.
At the same time, where a great deal of work has been done to create display effects for rasterized display representations, vector drawing applications have typically been more limited in the effects that may be applied to a vector drawing element. For example, vector drawing applications are unable to generate a display representation of vector drawing elements, where the display representation has a realistic traditional media appearance. That is, where the vector drawing element (e.g., a collection of lines and curves) takes on the appearance of being hand-drawn using a pencil stroke.
One approach has been to use a texture map to create the appearance of a pencil stroke on a vector graphics element. While this approach works to a certain degree, it fails to provide a realistic appearance in many cases, particularly where multiple vector drawing elements intersect one another. This occurs because the texture map is “painted” onto the shape of the drawing element without regard for the structure of an underlying paper surface. Thus, where a one drawing element is rendered to include a stroke with at one density, another drawing element rendered at the same location may be rendered using a different density for stroke appearance. This typically results in a display representation that fails to provide a realistic hand-drawn appearance.
Accordingly, there is a need in the art for improved techniques for generating the appearance of pencil strokes from vector based drawing elements.